<template>
  <div>
    <el-table
      :data="data"
      :border="true"
      :header-cell-class-name="$style.tableHeaderCell"
      v-loading="loading"
      tooltip-effect="dark"
      style="width: 100%"
      ref="storeTable"
    >
      <el-table-column align="center" min-width="150px" prop="goodsCode" label="商品编码" show-overflow-tooltip></el-table-column>
      <el-table-column align="center" min-width="250px" prop="goodsName" label="商品名称"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="companyCode" label="分公司编码"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="minGross" label="最低毛利率">
        <template slot-scope="scope"> {{ scope.row.minGross }}% </template>
      </el-table-column>
      <el-table-column align="center" min-width="100px" prop="goodsTypeName" label="商品类型"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="limitNum" label="原价限购数量"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="limitFrequency" label="限购频率"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="activityPriceLimit" label="特价限购数量"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="autoPrice" label="自动调价">
        <template slot-scope="scope">
          {{ scope.row.autoPrice === 'Y' ? '是' : '否' }}
        </template>
      </el-table-column>
      <el-table-column align="center" min-width="100px" prop="operationManager" label="操作">
        <template slot-scope="scope">
          <div style="cursor:pointer;color: #409eff" @click="onOpenDetailModal(scope.row)">
            编辑
          </div>
        </template>
      </el-table-column>
    </el-table>
    <div :class="$style.tablePagination">
      <el-pagination
        @size-change="onPageSizeChange"
        @current-change="onPageNumChange"
        :current-page="currentPage"
        :page-sizes="[10, 15, 20, 50]"
        :page-size="pageSize"
        layout="total, prev, pager, next, sizes"
        :total="total"
      />
    </div>
  </div>
</template>
<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index';
export default Index;
</script>
